package com.cjjd.c.feature.home.hoteldevice;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.cjjd.c.R;
import com.cjjd.c.base.ActionBarFragment;
import com.cjjd.c.utils.FragmentUtil;
import com.cjjd.c.utils.ToastUtil;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ----------------------------------
 * Created by xyd on 2017/9/29.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class HotelDeviceFragment extends ActionBarFragment {
    @Bind(R.id.huiyishi)
    TextView huiyishi;
    @Bind(R.id.qipaishi)
    TextView qipaishi;
    @Bind(R.id.jianshenfang)
    TextView jianshenfang;
    @Bind(R.id.yuleshi)
    TextView yuleshi;
    @Bind(R.id.kafeiting)
    TextView kafeiting;
    @Bind(R.id.gengduo)
    TextView gengduo;
    @Bind(R.id.weiguanwang)
    TextView weiguanwang;
    @Bind(R.id.gongzhonghao)
    TextView gongzhonghao;
    @Bind(R.id.weibo)
    TextView weibo;
    @Bind(R.id.btn_next)
    Button btnNext;

    @Override
    public Object getTitleString() {
        return "服务设施";
    }

    @Override
    public int getContentView() {
        return R.layout.fragment_hotel_device;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.huiyishi, R.id.qipaishi, R.id.jianshenfang, R.id.yuleshi, R.id.kafeiting, R.id.gengduo, R.id.weiguanwang, R.id.gongzhonghao, R.id.weibo, R.id.btn_next})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.huiyishi:
                FragmentUtil.replaceWithAddToBack(mContext, new MeetingRoomFragment(), R.id.activity_body);
                break;
            case R.id.qipaishi:
                FragmentUtil.replaceWithAddToBack(mContext, new ChessRoomFragment(), R.id.activity_body);
                break;
            case R.id.jianshenfang:
//                break;
            case R.id.yuleshi:
//                break;
            case R.id.kafeiting:
//                break;
            case R.id.gengduo:
//                break;
            case R.id.weiguanwang:
//                break;
            case R.id.gongzhonghao:
//                break;
            case R.id.weibo:
//                break;
            case R.id.btn_next:
                ToastUtil.showToast("功能暂未开放");
                break;
        }
    }
}
